<div class="container" id="app">


<div class="row">
    <div class="col-md-12">    
        <ol class="breadcrumb">
            <li>
                <a href="<?=base_url('main')?>">首页</a>
            </li>
            <li class="active">Tag : <?=$tag_title?></li>
        </ol>
    </div>
</div>



<div class="row">
    <div class="col-sm-4">


        <?php foreach($tag_group_array as $tag_group_key => $tag_group_value){ ?>

            <h5>Group <?=$tag_group_key?> - <?=$tag_group_key?></h5>

            <ul>
                <?php foreach($tag_group_value as $tag_key => $tag_value){ ?>
                    <li><a href="<?=base_url('main/tag/') . $tag_value["tag_id"]?>"><?=$tag_value["tag_title"]?></a></li>
                <?php } ?>
            </ul>

            <p>&nbsp;</p>

        <?php } ?>



    </div><!-- .col-md-4 -->
    <div class="col-sm-8">










<!-- ===================================
POST
=================================== -->

<?php foreach($posts as $post_key => $post_value){ ?>


        <div class="panel panel-default">
            <div class="panel-heading">
                    <h3 class="panel-title">
                        <span class="pull-right"><a href="<?=base_url('main/post/') . $post_value['posts_catagory'] . '/' . $post_value['posts_id']?>" class="btn btn-xs btn-default">[编辑]</a></span>
                        liyi，<?=$post_value["posts_ctime"]?>，<?=$post_value["posts_update"]?>
                    </h3>
            </div>
            <div class="panel-body">
                    <p><pre><?=$post_value["posts_content"]?></pre></p>

                    <ul>
                        <?php foreach($post_value["posts_files_array"] as $file_key => $file_info){ ?>
                            <li>
                                <a target="_blank" href="<?=base_url('/uploads/') . $post_value['posts_catagory'] . '/' . $file_info["file_newname"]?>">
                                    <?=$file_info["file_oldname"]?>
                                    (<?=$file_info["file_size"]?>MB)
                                </a>
                            </li>

                        <?php }?>

                    </ul>

                    <div class="pull-right">
                        <span class="glyphicon glyphicon-folder-close" aria-hidden="true"></span> <?=$post_value["posts_catagory_title"]?>
                    </div>


                    <?php
                        if(is_array($post_value["posts_tags_array"])){
                            foreach($post_value["posts_tags_array"] as $tag_key => $tag_value){  
                    ?>
                        <a href="<?=base_url('main/tag/') . $tag_value['tag_id']?>" class="btn btn-xs btn-default">#<?=$tag_value['tag_title']?></a>
                    <?php
                            }//foreach
                        }else{
                            echo '';
                        } 
                    ?>

            </div>
        </div>


<?php } ?>

        

    </div>
</div>


</div><!-- .container -->




<script>
    var app = new Vue({
        el:"#app",
        data:{
            msg:"Hello world",
            style_new_post:true,
        },
        methods:{
            toggle_new_post(){
                this.style_new_post = !this.style_new_post;
            },
        }
    })
</script>



